Implement TriggerPool State Observation Service#81
Conversation
| } | ||
| } | ||
|
|
||
| override fun verifyCondition( |
Check warning
Code scanning / detekt
One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand.
| } | ||
| } | ||
|
|
||
| override fun verifyCondition( |
Check warning
Code scanning / detekt
Prefer splitting up complex methods into smaller, easier to understand methods.
| ) | ||
| ) | ||
| } | ||
| } catch (ex: Exception) { |
Check warning
Code scanning / detekt
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
| private val targetState: STE, | ||
| private val serviceType: ServiceTemplateType.ServiceTemplate.ServiceType | ||
| ) : AbstractTrigger() { | ||
| protected val LOGGER = LoggerFactory.getLogger(javaClass) |
Check warning
Code scanning / detekt
Variable names should follow the naming convention set in the projects configuration.
| import org.openbase.jul.pattern.controller.Remote | ||
| import org.openbase.jul.pattern.provider.DataProvider | ||
| import org.openbase.jul.pattern.trigger.AbstractTrigger | ||
| import org.openbase.type.domotic.state.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors.
| private val connectionRemote: ConnectionRemote | ||
| ) : AbstractTrigger() { | ||
| private val locationObserver: Observer<DataProvider<LocationDataType.LocationData>, LocationDataType.LocationData> | ||
| private val connectionObserver: Observer<DataProvider<ConnectionDataType.ConnectionData>, ConnectionDataType.ConnectionData> |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
|
|
||
| private fun verifyCondition() { | ||
| try { | ||
| if (locationRemote.data.presenceState.value == PresenceStateType.PresenceState.State.PRESENT && connectionRemote.doorState.value == DoorStateType.DoorState.State.OPEN || connectionRemote.windowState.value == WindowStateType.WindowState.State.OPEN) { |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
pLeminoq
left a comment
There was a problem hiding this comment.
Request so that I will see diffs from this state in the future.
module/dal/remote/src/main/java/org/openbase/bco/dal/remote/trigger/StateObservationService.kt
Fixed
Show fixed
Hide fixed
…current but also by the requested state. Thus toggeling between interferring scenes should be improved. Improve interruption handling.
...app/preset/src/test/java/org/openbase/bco/app/preset/agent/AbsenceEnergySavingAgentTest.java
Outdated
Show resolved
Hide resolved
…ent/AbsenceEnergySavingAgentTest.java
📜 Description
Changes proposed in this pull request: